<template>
    <div class="main-favorite-index">
      <van-image width="100%" :src="img" />
      <section>
        <center class="title"><strong>Your heart is empty</strong></center>
        <center class="content">Start fall in love with some good goods</center>
      </section>
      <div class="btns">
        <van-button round block type="primary" class="btn" :to="{name: 'Register'}"><strong>Start shoping</strong></van-button>
      </div>
      <van-swipe-cell v-for="item in 9" :key="item">
          <van-card 
              centered
              class="cart-card" 
              >
                  <template #title>
                      <span class="title">Red Apple</span>
                  </template>
                  <template #thumb>
                      <img class="img" :src="cover_img" />
                  </template>
                  <template #price>
                      <font color="#FF5E00" class="cart"><van-icon name="cart-o" size="24" class="icon" />Add to cart</font>
                  </template>
                  <template #num>
                      <span class="price">$4.99<em>kg</em></span>
                  </template>
          </van-card>
          <template #right>
              <van-button square type="danger" class="delete-button" >
                  <van-icon name="delete-o" size="30" />
              </van-button>
          </template>
      </van-swipe-cell>
    </div>
</template>

<script lang="ts" setup>
import { ref, watch  } from 'vue'
import product2 from '../../assets/product-2.png'
import cover from '../../assets/Group-260.png'

const img = cover
const cover_img = product2
const value = ref('')

</script>

<style lang="less" scoped>
.main-favorite-index {
  padding: 15px;
  .title {
    color: #7F4E1D;
    font-weight: bold;
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.165px;
    color: #7F4E1D;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    margin: 16px 0px;
  }
  .content {
    font-size: 16px;
    line-height: 19px;
    letter-spacing: -0.165px;
    color: #7F4E1D;
    width: 260px;
    margin: auto;
  }
  .btns {
    padding: 40px 0px;
    .btn {
      margin: 10px 0px;
      strong {
        font-size: 17px;
      }
    }
  }
  .cart-card {
      margin: 0;
      background-color: #fff;
      border-bottom: 1px solid #f1f1f1;
      .title {
          font-weight: bold;
          font-size: 18px;
          line-height: 22px;
          color: #6D3805;
      }
      :deep(.van-card__thumb) {
          display: inline-flex;
          align-items: baseline;
          justify-content: center;
          .img {
              width: 70%;
          }
      }
      :deep(.van-card__bottom) {
          display: flex;
          justify-content: space-between;
          align-items: flex-end;
          margin-top: 20px;
          .van-stepper {
              background: #F4F4F4;
              box-shadow: inset 0px 0px 4px rgba(109, 56, 5, 0.2);
              border-radius: 30px;
              padding: 3px;
              button {
                  background: #fff;
                  color: #6D3805;
                  box-shadow: 0px 1px 2px rgba(109, 56, 5, 0.2);
              }
          }
          .price {
              font-size: 18px;
              line-height: 22px;
              text-align: right;
              color: #6D3805;
              em {
                  margin-left: 5px;
                  font-size: 14px;
                  font-style: normal;
              }
          }
          .cart {
            display: flex;
            align-items: center;
            color: #FF5E00;
            font-size: 18px;
            .icon {
              margin-right: 5px;
            }
          }
      }
      
  }
  .delete-button {
      width: 68px;
      height: 100%;
      background: rgba(164, 43, 50, 1);
  }
}
</style>
